﻿@{
    List<Onlyle.Model.E_QingSong_Article> ArticleList = Model;

    string imgpath = "";
    if (ViewBag.Type=="每日吐槽")
    {
        imgpath = "http://img.2333.me/src/";
    }
    bool wangzhaitag = false;
    string partpath = "qingsong";
    if (Request.Path.Contains("wangzhai"))
    {
        wangzhaitag = true;
        partpath = "wangzhai";
    }
    
}
<div class="wrap">
        	<div class="container">
                <section>
                	<div class="row">
                    	<div class="span6 offset1">
                            @for (int i = 0; i < ArticleList.Count; i++)
                            {
                                string url = "http://www.onlyle.com/qingsong/detail/";
                                if (wangzhaitag)
                                {
                                    url = "http://www.onlyle.com/wangzhai/detail/";
                                }    
                                <div class="post">
                                    <h2 class="title"><span><a target="_blank" href="~/@partpath/detail/@ArticleList[i].QingSong_ID">@{ViewContext.Writer.Write(ArticleList[i].QingSong_ContentTitle);}</a></span></h2>
                                        <div class="avatar"><img style="width:170px;height:170px;"  src="@ArticleList[i].QingSong_ImgAddress" /></div>
                                        <div class="comment_right">
                                            <p>@{ViewContext.Writer.Write(Industry.Framework.Common.Helper.StringHelper.ClipString(ArticleList[i].QingSong_ContentProfile, 350));}</p>
                                        </div>
                                        <div class="clear"></div>
                                    <div class="post_info">
                                	    <div class="fleft">时间: @ArticleList[i].QingSong_ContentFromDate / Tags <span>@ArticleList[i].QingSong_Type</span></div>
                                        <div class="fright" style="padding-top:5px">
                                             @RenderPage("~/Views/Shared/_share_litter.cshtml", new
                                        {
                                            sharttitle = ArticleList[i].QingSong_ContentTitle,
                                            sharturl = url + ArticleList[i].QingSong_ID,
                                            shartpic = ArticleList[i].QingSong_ImgAddress,
                                            shartsummary = Industry.Framework.Common.Helper.StringHelper.ClipString(ArticleList[i].QingSong_ContentProfile, 200)
                                        })
                                        </div>                                    
                                	    <div class="clear"></div>
                                    </div>
                                </div>
                            }
                            @RenderPage("~/Views/Shared/_Pagination.cshtml")
                        </div>
                    	<div class="span4">
                        	<div class="sidebar">
                            	 @RenderPage("~/Views/Shared/_XingZuo.cshtml")
                                
                                 @if (wangzhaitag)
                                 { 
                                    @RenderPage("~/Views/Shared/_wangzai_tag.cshtml")
                                 }
                                 else
                                 {
                                    @RenderPage("~/Views/Shared/_qingsong_tag.cshtml")
                                 }
                                
                                  @RenderPage("~/Views/Shared/_SHAREDUANLUO.cshtml")                             
                            </div>                             
                        </div>   
                                  	
                	</div>
                    
                </section>
            </div>

        </div>

<script type="text/javascript">
    $(".sidebar").pin({
        containerSelector: ".container"
    })
    var tag = '@Request.RequestContext.RouteData.Values["action"]';
    
        $("#tages a").each(function(){
            $(this).removeClass("tagesClass");
            if ($(this).attr("href").indexOf(tag) > 0)
            {
                $(this).addClass("tagesClass");
            }
        })
</script>

<script type="text/javascript" src="http://v3.jiathis.com/code/jia.js?uid=1852680" charset="utf-8"></script>
<script>
    var jiathis_config = {

    }
    function setShare(title, url, pic,summary) {
        jiathis_config.title = title;
        jiathis_config.url = url;
        jiathis_config.summary = summary;
        jiathis_config.pic = pic;
    }
</script>
